#!/usr/bin/env python
import sys
import json

num_tests = 0
for server in json.load(open(sys.argv[1])).values():
  for test, result in server.items():
    is_test = 0
    for k, v in result.items():
      if k[:8].lower() != 'behavior':
        continue
      is_test = 1
      if v != 'OK' and v != 'INFORMATIONAL':
        raise Exception('Invalid %s %s for test %s' % (k, v, test))
    num_tests += is_test
if num_tests < 100:
  raise Exception('Too few tests done %s' % num_tests)
print('Output report is fine')
